#ifndef VDATA_HASH_H
#define VDATA_HASH_H

/*
 **************************************************************************
 *                                                                        *
 *          General Purpose Hash Function Algorithms Library              *
 *                                                                        *
 * Author: Arash Partow - 2002                                            *
 * URL: http://www.partow.net                                             *
 * URL: http://www.partow.net/programming/hashfunctions/index.html        *
 *                                                                        *
 * Copyright notice:                                                      *
 * Free use of the General Purpose Hash Function Algorithms Library is    *
 * permitted under the guidelines and in accordance with the most current *
 * version of the Common Public License.                                  *
 * http://www.opensource.org/licenses/cpl1.0.php                          *
 *                                                                        *
 **************************************************************************
*/
#include "includes.h"

#define	PJW_STRING_UBAUD	0x00596694	//UBAUD
#define	PJW_STRING_UDATA	0x00598681	//UDATA
#define	PJW_STRING_USTOP	0x005A8940	//USTOP
#define	PJW_STRING_UPARI	0x005A4669	//UPARI
#define PJW_STRING_MCONF    0x00518426  //MCONF
#define	PJW_STRING_MDEV     0x000518A6	//MDEV
#define	PJW_STRING_MTYPE	0x00529E45	//MTYPE
#define	PJW_STRING_MADDR	0x00515892	//MADDR
#define	PJW_STRING_MNUM     0x0005239D	//MNUM
#define	PJW_STRING_MTOUT	0x005294A4	//MTOUT
#define	PJW_STRING_MFTIM	0x0051B8DD	//MFTIM
#define	PJW_STRING_MROUD	0x00527494	//MROUD
#define	PJW_STRING_M1XNB	0x00506D22	//M1XNB
#define	PJW_STRING_M2XNB	0x00507D22	//M2XNB
#define	PJW_STRING_M3XNB	0x00508D22	//M3XNB
#define	PJW_STRING_M4XNB	0x00509D22	//M4XNB
#define	PJW_STRING_SIP1     0x00057E31	//SIP1
#define	PJW_STRING_SPOT1	0x00585471	//SPOT1
#define	PJW_STRING_SCMOD	0x00578234	//SCMOD
#define	PJW_STRING_SHBT     0x00057C74	//SHBT
#define	PJW_STRING_STAGM	0x005885BD	//STAGM
#define	PJW_STRING_STAGX	0x005885C8	//STAGX
#define	PJW_STRING_STAGY	0x005885C9	//STAGY
#define	PJW_STRING_SLOOP	0x00581440	//SLOOP
#define	PJW_STRING_SFRQ     0x00057B71	//SFRQ
#define	PJW_STRING_S2ON     0x0005673E	//S2ON
#define	PJW_STRING_SIP2     0x00057E32	//SIP2
#define	PJW_STRING_SPOT2	0x00585472	//SPOT2
#define	PJW_STRING_GAPN     0x0004B64E	//GAPN
#define	PJW_STRING_GAPNU	0x004B6535	//GAPNU
#define	PJW_STRING_GAPNP	0x004B6530	//GAPNP


typedef unsigned int (*hash_function)(char*, unsigned int len);

unsigned int RSHash  (char* str, unsigned int len);
unsigned int JSHash  (char* str, unsigned int len);
unsigned int PJWHash (char* str, unsigned int len);
unsigned int ELFHash (char* str, unsigned int len);
unsigned int BKDRHash(char* str, unsigned int len);
unsigned int SDBMHash(char* str, unsigned int len);
unsigned int DJBHash (char* str, unsigned int len);
unsigned int DEKHash (char* str, unsigned int len);
unsigned int BPHash  (char* str, unsigned int len);
unsigned int FNVHash (char* str, unsigned int len);
unsigned int APHash  (char* str, unsigned int len);

int get_hash_index(char *string);
#endif // VDATA_HASH_H

